<?php
  /** if (!class_exists("Config"))        include_once 'config/classes/class.Config.php';
   $cfg = new config();
   
   require_once $cfg->pathPHPMailer."/class.phpmailer.php";
   
   $mail = new PHPMailer();
   $mail->IsSMTP(); // telling the class to use SMTP

try {

        $mail->Host       = "ssl://smtp.gmail.com"; // SMTP server

        $mail->SMTPDebug  = 2;                     // enables SMTP debug information (for testing)

        $mail->SMTPAuth   = true;                  // enable SMTP authentication

        $mail->Port       = 465;                    // set the SMTP port for the GMAIL server

        $mail->Username   = "djmasakre@gmail.com"; // SMTP account username

        $mail->Password   = "Th1nd3rfuck";        // SMTP account password

        $mail->AddReplyTo('admin@electrolinerasonline.com', 'admin');

        $mail->AddAddress('djmasakre@gmail.com');

        //$mail->From('admin@electrolinerasonline.com');


        $mail->Subject = 'PHPMailer Test Subject via mail(), advanced';

        $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically

        $mail->MsgHTML = file_get_contents($cfg->pathPHPMailer.'/ChangeLog.txt');

        $mail->AddAttachment('images/phpmailer.gif');      // attachment

        $mail->AddAttachment('images/phpmailer_mini.gif'); // attachment

        $mail->Send();

        echo "Message Sent OK<p></p>\n";

        
} catch (phpmailerException $e) {
    echo $e->errorMessage(); //Pretty error messages from PHPMailer

} catch (Exception $e) {
    echo $e->getMessage(); //Boring error messages from anything else!

}**/
   
   if (!class_exists("Config"))        include_once 'config/classes/class.Config.php';
   $cfg = new config();
   
   if (!class_exists("Mensaje"))       include_once $cfg->pathClasses.'/class.Mensaje.php';
   
   $msg = new Mensaje();
   
   $msg->setAsunto("Test");
   //$msg->setContenido("Usuario registrado");
   $msg->setContenido_html($cfg->pathMailTemplates."/template_registro.php");
   $msg->setRemitente("djmasakre@gmail.com");
   $msg->setDestinatario("djmasakre@gmail.com");
   $msg->setTipo("email");
   
//   var_dump($msg)
   
   if ($msg->enviar()) echo "Envio correcto";
   else                echo "fuck my life"; 
   
  
?>
